import {request} from '../utils/request'

export function selectAll(params) {
    return request({
        method: 'get',
        url: 'report',
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function selectAllById(params) {
    return request({
        method: 'get',
        url: 'report/' + params.reporterId,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function deleteReport(params) {
    return request({
        method: 'delete',
        url: 'report/' + params.id,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}

export function insertReport(params) {
    return request({
        method: 'post',
        url: 'report/add',
        data: params,
        headers: {
            'Authorization': window.localStorage.token,
        },
    })
}